package com.vincent.template.repository;

import com.vincent.template.commons.base.BaseJpaRepository;
import com.vincent.template.domain.SysBindUserGroupRolePo;

import java.util.Collection;
import java.util.List;

/**
 * @author Vincent Wang
 * @date 2020/12/30 11:21
 */
public interface SysBindUserGroupRoleRepository extends BaseJpaRepository<SysBindUserGroupRolePo, Long> {
    List<SysBindUserGroupRolePo> findByUserGroupIdIn(Collection<Long> userGroupIds);
    List<SysBindUserGroupRolePo> findByRoleId(Long roleId);
    int deleteByUserGroupId(Long userGroupId);
    List<SysBindUserGroupRolePo> findByUserGroupIdAndRoleIdIn(Long userGroupId, Collection<Long> roleIds);
}
